package org.gten.gegedexin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author Eric
 * @date 2023/6/29
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "token_info")
public class TokenPojo {
    @TableId(value = "token", type = IdType.NONE)
    private String token;

    @TableField(value ="account")
    private String account;

    @TableField(value = "time")
    private LocalDateTime time;

    @TableField(value = "limit_")
    private Integer limit;

    public void setAccount(String account) {
        this.account = account;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "TokenPojo{" +
                "account='" + account + '\'' +
                ", token='" + token + '\'' +
                ", time=" + time +
                ", limit=" + limit +
                '}';
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }
}
